#include "basicunit.c"
#include<stdio.h>
int main(int argc,char* argv[]){
	Unit *alwaystrue=newalwaystrue(),*alwaysfalse=newalwaysfalse(),
	*rs=newrslatch();
	connectunit(alwaysfalse,0,rs,0);
	connectunit(alwaysfalse,0,rs,1);
	Unit* v[]={alwaystrue,alwaysfalse,rs};
	for(size_t i=0;i<4;i++){
		rununits(v,3);
		printf("T%zu Q:%lld\n",i,rs->out[0].value);
	}
	freeunit(alwaysfalse);
	freeunit(alwaystrue);
	freeunit(rs);
	return 0;
}